/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidad;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author pepe
 */
@Entity
@Table(name = "marca", catalog = "SBDB", schema = "")
@NamedQueries({
    @NamedQuery(name = "Marca.findAll", query = "SELECT m FROM Marca m")})
public class Marca implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "idMarca")
    private Integer idMarca;
    @Column(name = "nombre")
    private String nombre;
    @Column(name = "sector")
    private String sector;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "marca")
    private List<Campaña> campañaList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "marca")
    private List<Registromonitoreoaudio> registromonitoreoaudioList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "marca")
    private List<Registromonitoreovideo> registromonitoreovideoList;

    public Marca() {
    }

    public Marca(Integer idMarca) {
        this.idMarca = idMarca;
    }

    public Integer getIdMarca() {
        return idMarca;
    }

    public void setIdMarca(Integer idMarca) {
        this.idMarca = idMarca;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getSector() {
        return sector;
    }

    public void setSector(String sector) {
        this.sector = sector;
    }

    public List<Campaña> getCampañaList() {
        return campañaList;
    }

    public void setCampañaList(List<Campaña> campañaList) {
        this.campañaList = campañaList;
    }

    public List<Registromonitoreoaudio> getRegistromonitoreoaudioList() {
        return registromonitoreoaudioList;
    }

    public void setRegistromonitoreoaudioList(List<Registromonitoreoaudio> registromonitoreoaudioList) {
        this.registromonitoreoaudioList = registromonitoreoaudioList;
    }

    public List<Registromonitoreovideo> getRegistromonitoreovideoList() {
        return registromonitoreovideoList;
    }

    public void setRegistromonitoreovideoList(List<Registromonitoreovideo> registromonitoreovideoList) {
        this.registromonitoreovideoList = registromonitoreovideoList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idMarca != null ? idMarca.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Marca)) {
            return false;
        }
        Marca other = (Marca) object;
        if ((this.idMarca == null && other.idMarca != null) || (this.idMarca != null && !this.idMarca.equals(other.idMarca))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidad.Marca[ idMarca=" + idMarca + " ]";
    }
    
}
